<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="com.ubst.smartad.common.*" %>
<%@page import="com.ubst.smartad.env.*" %>
<%@page import="com.ubst.smartad.session.*" %>
<%@page import="com.ubst.smartad.logger.Debug" %>
<%@page import="net.sf.json.JSONArray"  %>
<%@page import="net.sf.json.JSONObject"  %>
<%@page import="java.util.HashMap" %>
<%@page import="java.util.ArrayList" %>
<%@page import="java.util.List" %>
<%@page import="java.io.PrintWriter" %>
<%@page import="com.ubst.smartad.dbpool.TransactionManager" %>
<%@page import="com.ubst.smartad.impl.admin.log.LogMngImpl" %>
<%@include file="/jsp/inc/base.jsp"%>

<jsp:useBean id="tem" class="com.ubst.smartad.template.Template" scope="page"/>
<% 
// tem.setFileText( web_root+"skin1/test/test.html");
// tem.setReplaceKey("{TEST}", "aabbcc");

try{
	System.out.println("request.getParameterMap() "+request.getParameterMap());
	
	/*
	*	setting
	*
	*//////////////////
	String system_name = request.getParameter("system_name");
	///////////////////

	HashMap logMap = new HashMap();
	LogMngImpl logMng = null;
	TransactionManager tm = new TransactionManager();
	
	logMng = new LogMngImpl(tm.connection, serverName, fhostEnv.getLogLevel());
	logMap = logMng.getLogInfo(system_name);// list
	
	JSONArray jsonArr = JSONArray.fromObject(logMap);
	JSONObject jsonObj = new JSONObject();
	jsonObj.put("rows", jsonArr);		// Data

	
	response.setContentType("text/plain; charset=utf-8"); 
	response.setHeader("Cache-Control", "no-cache"); 
	//PrintWriter out = response.getWriter();
	out.print(jsonObj.toString());
	System.out.println("jsonObj.toString() "+jsonObj.toString());
	out.flush();
}catch (Exception e) {			
}

%>			